In recent years, there have been increasing demands for remote control of home appliances such as televisions and illumination and other client terminals from a client terminal such as a smartphone and a notebook PC. However, it is often the case that client terminals cannot directly communicate with each other, such as the case where a connection from a different communication network is restricted. For such a case, one method of achieving two-way communication between client terminals is to use a server supporting WebSocket, which is one of communications protocols, as a relay server.
Meanwhile, recent years have seen widespread use of cloud computing services, which provide services over the Internet. One of the cloud computing services is IaaS (Infrastructure as a Service). The IaaS is a service that creates a virtual server or the like (instance) using a virtualization technology and provides it as an infrastructure resource constituting a system. Web service providers or the like using the IaaS can flexibly perform an operation such as adding a virtual server in accordance with the load status of a Web server to expand (scale out) a system. In addition, in the case where the number of connections differs between a daytime period and a nighttime period, such an operation can be performed that scales out a system in the daytime period when there are a large number of connections and returns the system to the original state in the nighttime period. The Web service provider can thereby reduce unnecessary instance usage charges in a time period during which the number of connections decreases, while dealing with the fluctuations of the number of connections.
Now, it is known that, also with respect to connections for the above-described remote control, the number of connections differs between a daytime period and a nighttime period. Therefore, there is a great advantage of constructing a WebSocket server used as a relay server using the IaaS. However, a virtual server must stop after a usage time elapses regardless of the presence/absence of connection. If connections are forcibly disconnected, many of users the connections of which are disconnected immediately try to reconnect to a service, and thus a large number of connecting requests are concentrated to the remaining servers. This causes the loads on the server to temporarily rise suddenly, which is problematic.